#ifndef skyNumber_h__
#define skyNumber_h__
#include "./skyObject.h"
namespace Sky
{

class int32 : public Memory
{
public:
	int32(){}
	int32(int i):_i(i){}
	virtual StringPtr toString(StringPtr& str = StringPtr());
	operator int(){return _i;}
	void operator = (int32 i){_i = i;}
	int32 operator +=(int32 i){ return _i += i;}
private:
	int _i;
};
//////////////////////////////////////////////////////////////////////////
class Int : public Object
{
public:
	Int(){}
	Int(int32 i);
	~Int(){}
	virtual StringPtr toString(StringPtr& str = StringPtr());
	operator int32(){return _i;}
	Int operator + (int32 i){ return _i + i;}
protected:
	int32 _i;
};
class IntPtr : public RefPtr<Int>
{
public:
	IntPtr(){}
	IntPtr(Int* i):RefPtr<Int>(i){}
	Int operator + (Int i)
	{
		return *leakPtr() + i;
	}
};
//typedef RefPtr<Int> IntPtr;
}
#endif // skyNumber_h__